(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["preloadChunk-TopBar"],{"05a9":function(t,e,i){"use strict";i("945f")},1754:function(t,e,i){"use strict";var s=i("5530"),a=(i("ac1f"),i("841c"),i("ca47"));e["a"]={computed:Object(s["a"])({},Object(a["e"])("breakpoints",["isMobile","isMobileOrTablet"])),methods:{sendClickEvent(t){this.$analytics.clickEvent({button:t})},sendClickTabGameEvent(t,e){var i;const s={button:this.GTM_ELEMENTS.popup.search[e].game,currency_type:(null===(i=t.gtm)||void 0===i?void 0:i.currency_type)||null,game_identifier:t.identifier,position:t.gtm.position,line:t.gtm.line};this.$analytics.clickEvent(s)},sendClickSearchGameEvent(t,e){var i;const s={button:e,currency_type:(null===(i=t.gtm)||void 0===i?void 0:i.currency_type)||null,game_identifier:t.identifier,position:t.gtm.position,line:t.gtm.line};this.$analytics.clickEvent(s)},sendSearchEvent(t,e){const i={event:"Search",request:t,reason:e};this.$analytics.logEvent(i)},sendSearchGameEvent(t,e,i){const s={event:"Search",request:t,reason:i,game_identifier:e.identifier,position:e.gtm.position,line:e.gtm.line};this.$analytics.logEvent(s)},sendSearchProviderEvent(t,e){const i={event:"Search",request:t,reason:"provider",provider_name:e.name};this.$analytics.logEvent(i)},isHoveredGame({id:t}){return Number(this.hoveredGame)===Number(t)}}}},2746:function(t,e,i){},5975:function(t,e,i){"use strict";i("4de4"),i("caad"),i("d81d"),i("14d9"),i("2532");var s=i("ca47"),a=i("10ba");const o=["ios","android"];e["a"]={computed:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Object(s["e"])("bottomSheet",["getOpenedBottomSheets"])),Object(s["e"])("breakpoints",["isMobileOrTablet"])),Object(s["e"])("cmsConfig",["getAppLinks","getDomainWebView"])),Object(s["e"])("player",["getLanguageForUrl"])),{isNotAndroid(){return"android"!==a["a"].osName.toLowerCase()},iosLink(){return"Mac OS"===a["a"].osName&&this.getAppLinks.macOs?this.getAppLinks.macOs:this.getAppLinks.iOs},isDownloadAppPage(){return this.$route.path.includes(this.getAppLinks.android)},mappedSystems(){const t=this.isDownloadAppPage?this.getAppLinks.androidApp:`${this.getLanguageForUrl}${this.getAppLinks.android}`;return this.getDomainWebView?[]:o.map(e=>({name:e,link:"ios"===e&&(this.isNotAndroid||this.isDownloadAppPage)?this.iosLink:t}))},systems(){return this.mappedSystems.filter(({name:t})=>t===a["a"].osName.toLowerCase())}}),methods:{handleClick(t){var e;this.gtmElement&&this.$analytics.clickEvent({button:""+this.gtmElement,option:t.name}),"ios"===t.name&&this.isNotAndroid||this.isDownloadAppPage?window.open(t.link):(this.$router.push(t.link).catch(()=>({})),this.$emit("click-handler"),(null===(e=this.getOpenedBottomSheets)||void 0===e?void 0:e.length)&&this.isMobileOrTablet&&this.$bus.emit("close-menu-burger-bottom-sheets"))}}}},"945f":function(t,e,i){},d0b2:function(t,e,i){"use strict";i("2746")},d55c:function(t,e,i){"use strict";i.r(e);i("ac1f"),i("841c");var s=function(){var t=this,e=t._self._c;return e("header",{directives:[{name:"scroll",rawName:"v-scroll",value:{handler:t.onScroll,throttleTime:0},expression:"{ handler: onScroll, throttleTime: 0 }"}],ref:"topBar",staticClass:"top-bar",class:t.topBarClasses},[e("div",{staticClass:"top-bar__wrapper"},[e("div",{ref:"topBarLeft",staticClass:"top-bar__left-wr"},[e("div",{staticClass:"top-bar__left"},[e("div",{staticClass:"top-bar__burger-logo"},[t.isMobileOrTablet?t._e():e("btn",{directives:[{name:"gtm",rawName:"v-gtm:click",value:t.GTM_ELEMENTS.top.menu.main,expression:"GTM_ELEMENTS.top.menu.main",arg:"click"}],attrs:{m:"",circle:"","secondary-c":"",type:"button",icon:"burger"},on:{click:t.toggleMenu}}),e("a",{directives:[{name:"gtm",rawName:"v-gtm:click",value:t.GTM_ELEMENTS.top.home,expression:"GTM_ELEMENTS.top.home",arg:"click"}],ref:"logoImage",staticClass:"top-bar__logo",attrs:{href:t.casinoUrl,"data-test":"logo_casino"},on:{click:function(e){return e.preventDefault(),t.clickLogo.apply(null,arguments)}}},[t.isMobileOrTablet?e("div",{staticClass:"top-bar__logo-img",style:`background-image: url(${t.logoSrc})`}):e("img",{staticClass:"top-bar__logo-img",attrs:{src:t.logoSrc,alt:"logo_flagman"}})])],1),t.isMobileOrTablet?t._e():e("div",{staticClass:"top-bar__menu"},[e("router-link",{directives:[{name:"gtm",rawName:"v-gtm:click",value:t.GTM_ELEMENTS.top.casino,expression:"GTM_ELEMENTS.top.casino",arg:"click"}],staticClass:"top-bar__menu-link",class:{"top-bar__menu-link--active":t.isCasinoPages},attrs:{to:t.casinoUrl}},[e("div",{staticClass:"top-bar__menu-link-hover"}),t.isCasinoPages?t._e():e("icon",{staticClass:"top-bar__menu-icon",attrs:{"icon-name":"casino"}}),e("span",{staticClass:"top-bar__menu-text"},[t._v(" "+t._s(t.$t("top_bar.casino"))+" ")])],1),e("router-link",{directives:[{name:"gtm",rawName:"v-gtm:click",value:t.GTM_ELEMENTS.top.sport,expression:"GTM_ELEMENTS.top.sport",arg:"click"}],staticClass:"top-bar__menu-link",class:{"top-bar__menu-link--active":t.isSportPages},attrs:{to:t.getLanguageForUrl+"/sports"},nativeOn:{click:function(e){return t.handleMenuSportClick.apply(null,arguments)}}},[e("div",{staticClass:"top-bar__menu-link-hover"}),t.isSportPages?t._e():e("icon",{staticClass:"top-bar__menu-icon",attrs:{"icon-name":"sport"}}),e("span",{staticClass:"top-bar__menu-text"},[t._v(" "+t._s(t.$t("top_bar.sport"))+" ")])],1)],1)])]),e("div",{staticClass:"top-bar__center"},[e("div",{staticClass:"top-bar__search-wr"},[e("div",{staticClass:"top-bar__search-border"}),t.isShowSearch?e("div",{staticClass:"top-bar__search"},[e("button",{directives:[{name:"gtm",rawName:"v-gtm:click",value:{button:t.GTM_ELEMENTS.top.search,isGtmClickFirst:!0},expression:"{ button: GTM_ELEMENTS.top.search, isGtmClickFirst: true }",arg:"click"}],staticClass:"top-bar__search-btn",attrs:{id:"top-search",type:"button","data-test":"top-search"},on:{click:t.openSearch}},[e("span",{staticClass:"top-bar__search-btn-border"}),e("span",{staticClass:"top-bar__search-btn-text"},[t._v(" "+t._s(t.$t("search.placeholder_btn"))+" ")]),e("span",{staticClass:"top-bar__search-btn-icon-wr"},[e("icon",{staticClass:"top-bar__search-btn-icon",attrs:{"icon-name":"search"}})],1)])]):t._e()])]),e("div",{staticClass:"top-bar__right-wr",style:{"min-width":t.topBarRightWidth}},[e("div",{staticClass:"top-bar__right"},[t.isAppButtonVisible?e("top-bar-app-button"):t._e(),e("div",{staticClass:"top-bar__user"},[t.isPayoutBtnVisible?e("payout-cancel-btn"):t._e(),t.isShowMessenger?e("messenger-micro-app",{attrs:{"is-sidebar-opened":Boolean(t.getOpenedSidebar),theme:"dark","site-name":"flagman"}}):t._e(),e("user-top",{attrs:{slot:"online"},slot:"online"})],1)],1)])])])},a=[],o=i("1da1"),r=i("3835"),n=i("5530"),c=(i("14d9"),i("ca47")),l=i("0594"),p=i("5d2a"),h=i("8fc3"),d=i("e613"),u=i("1754"),b=i("a026"),g=function(){var t=this,e=t._self._c;return e("div",{staticClass:"top-bar__app-buttons"},t._l(t.systems,(function(i){return e("btn",{key:i.name,staticClass:"top-bar__app-button",attrs:{s:"",secondary:""},on:{click:function(e){return t.handleClick(i)}}},[e("div",{staticClass:"top-bar__app-button__inner"},[e("img",{staticClass:"top-bar__app-button-icon",attrs:{src:t.changeImg(i.name),alt:i.name}}),e("div",{staticClass:"top-bar__app-button-text"},[t._v(" "+t._s(t.$t("buttons_app.app_download"))+" ")])])])})),1)},m=[],_=i("5975"),v={name:"top-bar-app-button",components:{Btn:l["default"]},mixins:[_["a"]],props:{gtmElement:{type:String,default:""}},methods:{changeImg(t){return`/img/download-app/${t}_logo_app.svg`}}},O=v,w=(i("d0b2"),i("2877")),f=Object(w["a"])(O,g,m,!1,null,null,null),T=f.exports,k=i("8c34"),S=i("f489");const C=56,M="auto";var y={name:"top-bar",components:{MessengerMicroApp:S["a"],PayoutCancelBtn:k["a"],TopBarAppButton:T,UserTop:Object(b["defineAsyncComponent"])(()=>i.e("preloadChunk-UserTop").then(i.bind(null,"4d92"))),Btn:l["default"],Icon:p["a"]},mixins:[u["a"],h["a"],d["a"]],data(){return{isShowTopBar:!0,isScrolled:!1,isRequiredShowTopBar:!1,previousCoordinates:-C,topBarRightWidth:M}},computed:Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])({},Object(c["e"])("breakpoints",["isMobile","isMobileOrTablet","isDesktop","isDesktopOrLaptop"])),Object(c["e"])("cmsConfig",["getDomainWebView"])),Object(c["e"])("playerCashWait",["getDataArrayLength"])),Object(c["e"])("player",["isPlayerAuthorized","getLanguageForUrl","getIsNeedCardSelfieNotVerified"])),Object(c["e"])("modal",{currentModal:"current",hasOpenedModals:"hasOpened"})),Object(c["f"])("search",{searchIsOpened:"opened"})),Object(c["e"])("messenger",["getIsOpened"])),Object(c["e"])("playerCashWait",["getDataArrayLength"])),Object(c["e"])("menu",["getOpenedSidebar"])),Object(c["e"])("batches",["getIsInitialBatchLoaded"])),Object(c["e"])("interfaceTranslations",["isTranslationsUpdated"])),{},{isShowMessenger(){return this.isPlayerAuthorized&&this.isMobileOrTablet},isPayoutBtnVisible(){return this.isMobileOrTablet&&this.getDataArrayLength&&this.isPlayerAuthorized},isAppButtonVisible(){return this.isMobileOrTablet&&!this.isPlayerAuthorized},casinoUrl(){return this.getLanguageForUrl||"/"},hasCashWait(){return!this.isMobileOrTablet&&this.getDataArrayLength},isOpenGameInfoModal(){return this.hasOpenedModals&&"game-info"===this.currentModal.name},isShowSearch(){return this.isDesktopOrLaptop&&!this.isSportPages},topBarClasses(){const t=this.isShowTopBar||this.isOpenGameInfoModal||this.isSport;return[{"top-bar--reduce":this.hasCashWait,"top-bar--scrolled":this.isScrolled,"top-bar--high-index-sport":this.isTopBarHighIndex,"top-bar--webview":this.getDomainWebView},t?"top-bar--show":"top-bar--hide"]},isTopBarHighIndex(){return this.isSport&&this.getIsOpened},logoSrc(){return this.getDomainWebView&&this.isMobileOrTablet&&!this.isPlayerAuthorized?"/img/logo.svg":this.isMobileOrTablet?"/img/logo-mobile.svg":"/img/logo.svg"}}),watch:{searchIsOpened(t){t&&this.isMobile&&(this.isShowTopBar=!0)},isCasinoPages(){this.resizeHandler()},getIsInitialBatchLoaded(){this.resizeHandler()},isTranslationsUpdated(){this.resizeHandler()},isDesktop(){this.resizeHandler()}},created(){this.$bus.on("setting-required-top-bar",this.settingRequiredTopBar),this.$bus.on("show-top-bar",this.showTopBar)},beforeDestroy(){this.$bus.off("setting-required-top-bar",this.settingRequiredTopBar),this.$bus.off("show-top-bar",this.showTopBar)},methods:Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])({},Object(c["d"])("search",["openSearch"])),Object(c["d"])("modal",["closeModal"])),Object(c["d"])("menu",["changeBurger","toggleMenu"])),Object(c["d"])("overlay",["removeBodyOverflow"])),Object(c["d"])("player",["switchGroup"])),{},{clickLogo(){this.$bus.emit("toggle-filter",null),this.$bus.emit("toggle-game-provider",null),this.removeBodyOverflow(),this.$bus.emit("click-main-logo"),this.currentModal&&"patch-profile"!==this.currentModal.name&&this.closeModal(),this.getIsHomePage&&window.pageYOffset&&setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},300),this.$router.push(this.getLanguageForUrl||"/").catch(()=>({})),this.setDefaultBurgerButtonView()},setDefaultBurgerButtonView(){this.isMobile&&this.changeBurger({state:""})},settingRequiredTopBar(){this.isRequiredShowTopBar=!0,setTimeout(()=>{this.isRequiredShowTopBar=!1},1e3)},onScroll(){if(this.isMobileOrTablet&&(this.forceShowMenu||this.isOpenGameInfoModal))return void(this.isShowTopBar=!0);const t=document.querySelectorAll(".main-wrapper"),e=Object(r["a"])(t,1),i=e[0];if(!i)return;const s=i.getBoundingClientRect().top;this.isScrolled=s<0,this.isRequiredShowTopBar||(this.isShowTopBar=s>=this.previousCoordinates&&this.isMobileOrTablet),this.forceShowMenu=!1,(this.windowWidth!==window.innerWidth&&this.isMobileOrTablet||this.isRequiredShowTopBar)&&(this.isShowTopBar=!0),setTimeout(()=>{this.previousCoordinates=s>=-C?-C:s,this.windowWidth=window.innerWidth},300)},showTopBar(){this.isShowTopBar=!0},handleMenuSportClick(){this.isPlayerAuthorized&&this.switchGroup({add:"sport:visitor"})},resizeHandler(){var t=this;return Object(o["a"])((function*(){if(!t.getIsInitialBatchLoaded)return;if(!t.isDesktop)return void(t.topBarRightWidth=M);yield t.$nextTick();const e=t.$refs.topBarLeft;e&&(t.topBarRightWidth=e.getBoundingClientRect().width+"px")}))()}})},B=y,j=(i("05a9"),Object(w["a"])(B,s,a,!1,null,null,null));e["default"]=j.exports}}]);